package me.zhengjie.modules.service.impl;

import cn.hutool.core.date.DateTime;
import lombok.RequiredArgsConstructor;
import me.zhengjie.modules.domain.Api;
import me.zhengjie.modules.domain.ApiBatch;
import me.zhengjie.modules.domain.Batch;
import me.zhengjie.modules.domain.enterprise.EnterpriseInformation;
import me.zhengjie.modules.domain.enterprise.EnterpriseInvestment;
import me.zhengjie.modules.domain.enterprise.EnterpriseInvestmentInstitutions;
import me.zhengjie.modules.repository.ApiBatchMapper;
import me.zhengjie.modules.repository.ApiMapper;
import me.zhengjie.modules.repository.BatchMapper;
import me.zhengjie.modules.repository.enterprise.EnterpriseInfMapper;
import me.zhengjie.modules.repository.enterprise.EnterpriseInvInsMapper;
import me.zhengjie.modules.repository.enterprise.EnterpriseInvMapper;
import me.zhengjie.modules.service.EnterpriseInvService;
import me.zhengjie.modules.utils.Contents;
import me.zhengjie.modules.utils.JsonUtils;
import me.zhengjie.modules.utils.MyHttpUtils;
import me.zhengjie.utils.RedisUtils;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Service("EnterpriseInvService")
@RequiredArgsConstructor
public class EnterpriseInvServiceImpl implements EnterpriseInvService {

    private final EnterpriseInvMapper enterpriseInvMapper;

    /**
     * 批量添加企业投资动态信息
     * @param list
     * @return
     */
    @Transactional
    @Override
    public int addEnterpriseInvByList(List<EnterpriseInvestment> list) {
        return enterpriseInvMapper.insertEnterpriseInvByList(list);
    }

    @Override
    public List<EnterpriseInvestment> queryEnterpriseInvByName(String name) {
        return enterpriseInvMapper.selectEnterpriseInvByName(name);
    }

    @Override
    public List<EnterpriseInvestment> queryEnterpriseInvForPageByConditions(Map<String, Object> map) {
        return enterpriseInvMapper.selectEnterpriseInvForPageByConditions(map);
    }

    @Override
    public int queryEnterpriseInvForPageByConditionsToTotal(Map<String, Object> map) {
        return enterpriseInvMapper.selectEnterpriseInvForPageByConditionsToTotal(map);
    }
}
